#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
@AUTHOR: tyc
@VERSION: 1.0.0
@DESCRIPTION: 
@time: 2021-07-04 18:52:40 
"""
import time
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor


def fun(name):
    time.sleep(1)
    print(f'{name}')


if __name__ == '__main__':
    with ThreadPoolExecutor(5) as t:
        for i in range(10):
            t.submit(fun, i)
